from django.db import models


# Create your models here.

class Orders(models.Model):
    create_time = models.DateTimeField(auto_created=True, auto_now_add=True)
    update_time = models.DateTimeField(auto_now=True)
    order_number = models.CharField(max_length=32)
    product_name = models.CharField(max_length=32)
    quantity = models.PositiveSmallIntegerField()
    unit_price = models.DecimalField(max_digits=10, decimal_places=2)
    payment_status = models.SmallIntegerField(choices=((1, "未支付"), (2, "已支付"), (3, "已取消"), (4, "过期未支付")))
    payment_due_time = models.DateTimeField()
